# Maintainer: Brad Fanella <cesura@archlinux.org>
# Contributor: Martin Wimpress <code@flexion.org>

pkgname=marco
pkgver=1.26.1
pkgrel=1
pkgdesc="A window manager for MATE"
url="https://mate-desktop.org"
arch=('loong64' 'x86_64')
license=('GPL')
depends=('libcanberra' 'libgtop' 'mate-desktop' 'zenity' 'libxpresent' 'gettext' 'libxres')
makedepends=('itstool')
groups=('mate')
conflicts=('marco-gtk3')
replaces=('marco-gtk3')
source=("https://pub.mate-desktop.org/releases/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz")
sha256sums=('b4fa5550bf89d4f9eff5ae6e7d6150e3661a22d530d6addc6757bce8dd2a5d3d')

build() {
	cd "${pkgname}-${pkgver}"
    	./configure \
        	--prefix=/usr \
        	--sysconfdir=/etc \
        	--localstatedir=/var \
        	--enable-startup-notification

    	#https://bugzilla.gnome.org/show_bug.cgi?id=656231
    	sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

    	make
}

package() {
    	cd "${pkgname}-${pkgver}"
    	make DESTDIR="${pkgdir}" install
}
